-- ----------------------------------------------------------
--
-- Author: czf
-- date: 2018-12-14
-- description: 工厂模式-工厂类
--
-- ----------------------------------------------------------

ShapeFactory = ShapeFactory or BaseClass()

-- shapeType参数：暂时用字符串，最好用枚举管理
function ShapeFactory:GetShape(shapeType)
	if not shapeType then return end
	if shapeType == "CIRCLE" then
		return Circle.New()
	elseif shapeType == "RECTANGLE" then
		return Rectangle.New()
	elseif shapeType == "SQUARE" then
		return Square.New()
	end
end